/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.moedik.classes;

/**
 *
 * @author Yudi Retanto
 */
public class ShuttleServiceDb {
    
    protected int id;
    protected int travel_id;
    protected int origin_id;
    protected int city_origin_id;
    protected int destination_id;
    protected int city_destination_id;
    protected int fare;
    protected String day;
    protected String hour;

    public ShuttleServiceDb(int id, int travel_id, int origin_id, int destination_id, int fare, String day, String hour) {
        this.id = id;
        this.travel_id = travel_id;
        this.origin_id = origin_id;
        this.destination_id = destination_id;
        this.fare = fare;
        this.day = day;
        this.hour = hour;
    }

    public ShuttleServiceDb() {
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public int getDestination_id() {
        return destination_id;
    }

    public void setDestination_id(int destination_id) {
        this.destination_id = destination_id;
    }

    public int getFare() {
        return fare;
    }

    public void setFare(int fare) {
        this.fare = fare;
    }

    public String getHour() {
        return hour;
    }

    public void setHour(String hour) {
        this.hour = hour;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOrigin_id() {
        return origin_id;
    }

    public void setOrigin_id(int origin_id) {
        this.origin_id = origin_id;
    }

    public int getTravel_id() {
        return travel_id;
    }

    public void setTravel_id(int travel_id) {
        this.travel_id = travel_id;
    }
    
    public boolean isDay(int indeks){
        if(this.day.indexOf(Integer.toString(indeks)) != -1){
            return true;
        } else {
            return false;
        }
    }
    
}
